<?php get_header(); ?>

<div id="content">

	<div id="homepage">
    
		<?php /*Check for the 'gallery_styles' function. if it's there, then include it. If not, do nothing*/ ?>
        <?php if (function_exists('gallery_styles')) : ?>
       	<div id="fcg">
        	<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
        </div>
        <?php endif; ?>  
            
    	<div class="homepageleft">
			<?php $featured_cat_1 = get_option('chrome_featured_cat_1'); $featured_cat_1_num = get_option('chrome_featured_cat_1_num'); if(!$featured_cat_1) $featured_cat_1 = 1; //setting a default ?>
            <h3><?php echo cat_id_to_name($featured_cat_1); ?></h3>	
            <div class="homebox">   
				<?php $recent = new WP_Query("cat=".$featured_cat_1."&showposts=".$featured_cat_1_num); while($recent->have_posts()) : $recent->the_post();?>              
                <?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
				<a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
				<?php else: ?>
				<?php endif; ?>	
                <b><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></b>
                <?php the_content_limit(125, ""); ?>
                <div style="border-bottom:1px dotted #C0C0C0; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div>
                <?php endwhile; ?>
            </div>            
                                                   
		</div>
        
        <div class="homepageright">
			<?php $featured_vid_1 = get_option('chrome_featured_vid_1'); $featured_vid_1_num = get_option('chrome_featured_vid_1_num'); if(!$featured_vid_1) $featured_vid_1 = 1; //setting a default ?>           
            <h3><?php echo cat_id_to_name($featured_vid_1); ?></h3>	
            <div class="homebox">    
				<?php $recent = new WP_Query("cat=".$featured_vid_1."&showposts=".$featured_vid_1_num); while($recent->have_posts()) : $recent->the_post();?>
        		<b><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></b>
                <?php the_content(__('Read more'));?>
                <?php endwhile; ?>
            
            <?php $featured_vid_1 = get_option('chrome_featured_vid_1'); $featured_vid_1_num = get_option('chrome_featured_vid_1_num'); if(!$featured_vid_1) $featured_vid_1 = 1; //setting a default ?>  
            <h4>More <?php echo cat_id_to_name($featured_vid_1); ?></h4>
                <ul>
					<?php $recent = new WP_Query("cat=".$featured_vid_1."&showposts=".$featured_vid_1_list."&offset=".$featured_vid_1_num); while($recent->have_posts()) : $recent->the_post();?>
                    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
                    <?php endwhile; ?>
                </ul>
                
            </div>            

        </div>	
	</div>
			
	<?php include(TEMPLATEPATH."/sidebar.php"); ?> 

</div>

<!-- The main column ends  -->

<?php get_footer(); ?>